package org.prem.collection;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class HashMapSample {

	public static void main(String[] args){
		HashMap hm = new HashMap();
		hm.put("3", "Three");
		hm.put("8", "Eight");
		hm.put("5", "Five");
		hm.put("2", "Two");
		hm.put("1", "One");
		hm.put("9", "Nine");
		hm.put("4", "Four");
		//Map.Entry me = (Map.Entry)hm.entrySet();
		Iterator i = hm.entrySet().iterator();
		while(i.hasNext()){
			Map.Entry me = (Map.Entry)i.next();
			System.out.println("i key----->"+me.getKey());
			System.out.println("i value----->"+me.getValue());
		}
	}
	
	
}
